package rlex.classes.program;

import java.util.List;

/*
 * command;
 * command;
 * command
 */
public class CommandList {
	private List<Command> commands;

	public List<Command> getCommands() {
		return commands;
	}

	public void setCommands(List<Command> commands) {
		this.commands = commands;
	}	
	
	public String toString() {
		String ret = "";
		for (int i = 0; i < commands.size(); i++) {
			ret += commands.get(i).toString() + "; ";
		}
		return ret;
	}
	
	public void display(int level) {
		System.out.print("COMMANDS : ");
		for (int i = 0; i < commands.size(); i++) {
			commands.get(i).display(0);
			System.out.print(" ;\n");
		}
		System.out.print("\n");
	}
}
